using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using webapp4U.BOL;

namespace webapp4U.UI.Controls
{
    public partial class ThuVienHinhAnh : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Load_Menu();
        }

        private void Load_Menu()
        {
            if (!IsPostBack)
            {
                MenuCategory.Items.Clear();
                List<webapp4U.BOL.PhotoCategory> list = webapp4U.BOL.PhotoCategory.GetCateByParentCateID(Globals.ConvertToInt32(eCategory.AlbumsPublic));
                foreach (PhotoCategory c in list)
                {
                    MenuItem newMenu = new MenuItem();
                    newMenu.Text = (Globals.LangVietNam()) ? c.CateName : c.CateName_en;
                    newMenu.Value = c.CateID.ToString();
                    newMenu.NavigateUrl = "~/Photos/Photo.aspx?CateID=" + c.CateID.ToString();
                    MenuCategory.Items.Add(newMenu);
                }
            }
        }
    }
}